Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#21

Merged
marpisco merged 1 commit intomainfrom
alert-autofix-1
Jun 24, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#21
marpisco merged 1 commit intomainfrom
alert-autofix-1

Conversation

@marpisco
Copy link
Member

Potential fix for https://github.com/aejics/FormFill/security/code-scanning/1

To fix the issue, we need to add a permissions block to the workflow. Since the workflow only performs static analysis and does not require write access to any repository resources, the permissions can be set to contents: read. This ensures that the GITHUB_TOKEN has the minimal privileges required to complete the task.

The permissions block should be added at the root level of the workflow file to apply to all jobs in the workflow. Alternatively, it can be added specifically to the psalm job if other jobs in the workflow require different permissions.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@marpisco marpisco marked this pull request as ready for review June 24, 2025 10:23
@marpisco marpisco merged commit 7189b5d into main Jun 24, 2025
3 checks passed
@marpisco marpisco deleted the alert-autofix-1 branch June 24, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant